#!/bin/bash

IP=192.169.5.241
module_name=hello_drv.ko
app_name=hello_test

build_kernel()
{
    make
}

build_app()
{
    export PATH=${PATH}:/home/xgj/workspace/project/rsu7012/toolchains/arm-linux-gnueabi/bin
    arm-linux-gnueabi-gcc hello_test.c -o hello_test
}

copy_module_app()
{
    sshpass -p "cdgenvict" scp ${module_name} ${app_name} root@${IP}:/root
}

build_kernel

build_app

copy_module_app
